package com.shreecon.lms.interfaces.persistance;

import com.shreecon.lms.interfaces.IMessageConstant;
import com.shreecon.lms.interfaces.LMSException;

public class ShreeConsDAOFactory {


    /** The Constant _instance. */
	private static final ShreeConsDAOFactory _instance = new ShreeConsDAOFactory();
	
	/**
     * Instantiates a new employee dao factory.
     */
	private ShreeConsDAOFactory() {
		
	}
	
	/**
     * Gets the single instance of ShreeConsDAOFactory.
     * 
     * @return single instance of ShreeConsDAOFactory
     */
	public static final ShreeConsDAOFactory getInstance() {
		return _instance;
	}
	
	/**
     * Gets the employee dao.
     * 
     * @return the employee dao
     * @throws LMSException
     *             the lMS exception
     */
	public IShreeConsDAO getShreeConsDAO() throws LMSException {
		try {
			return (IShreeConsDAO)Class.forName("com.shreecon.lms.persistancy.ShreeConsDAO").newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
			throw new LMSException(IMessageConstant.TECH_ERROR, e);
		} catch (IllegalAccessException e) {
			e.printStackTrace();
			throw new LMSException(IMessageConstant.TECH_ERROR, e);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			throw new LMSException(IMessageConstant.TECH_ERROR, e);
		}
	}

}
